//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_exported import SotoCore

/// Service object for interacting with AWS Route53RecoveryControlConfig service.
///
/// Recovery Control Configuration API Reference for Amazon Route 53 Application Recovery Controller
public struct Route53RecoveryControlConfig: AWSService {
    // MARK: Member variables

    /// Client used for communication with AWS
    public let client: AWSClient
    /// Service configuration
    public let config: AWSServiceConfig

    // MARK: Initialization

    /// Initialize the Route53RecoveryControlConfig client
    /// - parameters:
    ///     - client: AWSClient used to process requests
    ///     - region: Region of server you want to communicate with. This will override the partition parameter.
    ///     - partition: AWS partition where service resides, standard (.aws), china (.awscn), government (.awsusgov).
    ///     - endpoint: Custom endpoint URL to use instead of standard AWS servers
    ///     - middleware: Middleware chain used to edit requests before they are sent and responses before they are decoded 
    ///     - timeout: Timeout value for HTTP requests
    ///     - byteBufferAllocator: Allocator for ByteBuffers
    ///     - options: Service options
    public init(
        client: AWSClient,
        region: SotoCore.Region? = nil,
        partition: AWSPartition = .aws,
        endpoint: String? = nil,
        middleware: AWSMiddlewareProtocol? = nil,
        timeout: TimeAmount? = nil,
        byteBufferAllocator: ByteBufferAllocator = ByteBufferAllocator(),
        options: AWSServiceConfig.Options = []
    ) {
        self.client = client
        self.config = AWSServiceConfig(
            region: region,
            partition: region?.partition ?? partition,
            serviceName: "Route53RecoveryControlConfig",
            serviceIdentifier: "route53-recovery-control-config",
            serviceProtocol: .restjson,
            apiVersion: "2020-11-02",
            endpoint: endpoint,
            serviceEndpoints: Self.serviceEndpoints,
            errorType: Route53RecoveryControlConfigErrorType.self,
            middleware: middleware,
            timeout: timeout,
            byteBufferAllocator: byteBufferAllocator,
            options: options
        )
    }


    /// custom endpoints for regions
    static var serviceEndpoints: [String: String] {[
        "aws-global": "route53-recovery-control-config.us-west-2.amazonaws.com"
    ]}



    // MARK: API Calls

    /// Create a new cluster. A cluster is a set of redundant Regional endpoints against which you can run API calls to update or get the state of one or more routing controls. Each cluster has a name, status, Amazon Resource Name (ARN), and an array of the five cluster endpoints (one for each supported Amazon Web Services Region) that you can use with API calls to the cluster data plane.
    @Sendable
    @inlinable
    public func createCluster(_ input: CreateClusterRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateClusterResponse {
        try await self.client.execute(
            operation: "CreateCluster", 
            path: "/cluster", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Create a new cluster. A cluster is a set of redundant Regional endpoints against which you can run API calls to update or get the state of one or more routing controls. Each cluster has a name, status, Amazon Resource Name (ARN), and an array of the five cluster endpoints (one for each supported Amazon Web Services Region) that you can use with API calls to the cluster data plane.
    ///
    /// Parameters:
    ///   - clientToken: A unique, case-sensitive string of up to 64 ASCII characters. To make an idempotent API request with an action, specify a client token in the request.
    ///   - clusterName: The name of the cluster.
    ///   - networkType: The network type of the cluster. NetworkType can be one of the following: IPV4, DUALSTACK.
    ///   - tags: The tags associated with the cluster.
    ///   - logger: Logger use during operation
    @inlinable
    public func createCluster(
        clientToken: String? = CreateClusterRequest.idempotencyToken(),
        clusterName: String? = nil,
        networkType: NetworkType? = nil,
        tags: [String: String]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateClusterResponse {
        let input = CreateClusterRequest(
            clientToken: clientToken, 
            clusterName: clusterName, 
            networkType: networkType, 
            tags: tags
        )
        return try await self.createCluster(input, logger: logger)
    }

    /// Creates a new control panel. A control panel represents a group of routing controls that can be changed together in a single transaction. You can use a control panel to centrally view the operational status of applications across your organization, and trigger multi-app failovers in a single transaction, for example, to fail over an Availability Zone or Amazon Web Services Region.
    @Sendable
    @inlinable
    public func createControlPanel(_ input: CreateControlPanelRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateControlPanelResponse {
        try await self.client.execute(
            operation: "CreateControlPanel", 
            path: "/controlpanel", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a new control panel. A control panel represents a group of routing controls that can be changed together in a single transaction. You can use a control panel to centrally view the operational status of applications across your organization, and trigger multi-app failovers in a single transaction, for example, to fail over an Availability Zone or Amazon Web Services Region.
    ///
    /// Parameters:
    ///   - clientToken: A unique, case-sensitive string of up to 64 ASCII characters. To make an idempotent API request with an action, specify a client token in the request.
    ///   - clusterArn: The Amazon Resource Name (ARN) of the cluster for the control panel.
    ///   - controlPanelName: The name of the control panel.
    ///   - tags: The tags associated with the control panel.
    ///   - logger: Logger use during operation
    @inlinable
    public func createControlPanel(
        clientToken: String? = CreateControlPanelRequest.idempotencyToken(),
        clusterArn: String? = nil,
        controlPanelName: String? = nil,
        tags: [String: String]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateControlPanelResponse {
        let input = CreateControlPanelRequest(
            clientToken: clientToken, 
            clusterArn: clusterArn, 
            controlPanelName: controlPanelName, 
            tags: tags
        )
        return try await self.createControlPanel(input, logger: logger)
    }

    /// Creates a new routing control. A routing control has one of two states: ON and OFF. You can map the routing control state to the state of an Amazon Route 53 health check, which can be used to control traffic routing. To get or update the routing control state, see the Recovery Cluster (data plane) API actions for Amazon Route 53 Application Recovery Controller.
    @Sendable
    @inlinable
    public func createRoutingControl(_ input: CreateRoutingControlRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateRoutingControlResponse {
        try await self.client.execute(
            operation: "CreateRoutingControl", 
            path: "/routingcontrol", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a new routing control. A routing control has one of two states: ON and OFF. You can map the routing control state to the state of an Amazon Route 53 health check, which can be used to control traffic routing. To get or update the routing control state, see the Recovery Cluster (data plane) API actions for Amazon Route 53 Application Recovery Controller.
    ///
    /// Parameters:
    ///   - clientToken: A unique, case-sensitive string of up to 64 ASCII characters. To make an idempotent API request with an action, specify a client token in the request.
    ///   - clusterArn: The Amazon Resource Name (ARN) of the cluster that includes the routing control.
    ///   - controlPanelArn: The Amazon Resource Name (ARN) of the control panel that includes the routing control.
    ///   - routingControlName: The name of the routing control.
    ///   - logger: Logger use during operation
    @inlinable
    public func createRoutingControl(
        clientToken: String? = CreateRoutingControlRequest.idempotencyToken(),
        clusterArn: String? = nil,
        controlPanelArn: String? = nil,
        routingControlName: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateRoutingControlResponse {
        let input = CreateRoutingControlRequest(
            clientToken: clientToken, 
            clusterArn: clusterArn, 
            controlPanelArn: controlPanelArn, 
            routingControlName: routingControlName
        )
        return try await self.createRoutingControl(input, logger: logger)
    }

    /// Creates a safety rule in a control panel. Safety rules let you add safeguards around changing routing control states, and for enabling and disabling routing controls, to help prevent unexpected outcomes. There are two types of safety rules: assertion rules and gating rules. Assertion rule: An assertion rule enforces that, when you change a routing control state, that a certain criteria is met. For example, the criteria might be that at least one routing control state is On after the transaction so that traffic continues to flow to at least one cell for the application. This ensures that you avoid a fail-open scenario. Gating rule: A gating rule lets you configure a gating routing control as an overall "on/off" switch for a group of routing controls. Or, you can configure more complex gating scenarios, for example by configuring multiple gating routing controls. For more information, see Safety rules in the Amazon Route 53 Application Recovery Controller Developer Guide.
    @Sendable
    @inlinable
    public func createSafetyRule(_ input: CreateSafetyRuleRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateSafetyRuleResponse {
        try await self.client.execute(
            operation: "CreateSafetyRule", 
            path: "/safetyrule", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a safety rule in a control panel. Safety rules let you add safeguards around changing routing control states, and for enabling and disabling routing controls, to help prevent unexpected outcomes. There are two types of safety rules: assertion rules and gating rules. Assertion rule: An assertion rule enforces that, when you change a routing control state, that a certain criteria is met. For example, the criteria might be that at least one routing control state is On after the transaction so that traffic continues to flow to at least one cell for the application. This ensures that you avoid a fail-open scenario. Gating rule: A gating rule lets you configure a gating routing control as an overall "on/off" switch for a group of routing controls. Or, you can configure more complex gating scenarios, for example by configuring multiple gating routing controls. For more information, see Safety rules in the Amazon Route 53 Application Recovery Controller Developer Guide.
    ///
    /// Parameters:
    ///   - assertionRule: The assertion rule requested.
    ///   - clientToken: A unique, case-sensitive string of up to 64 ASCII characters. To make an idempotent API request with an action, specify a client token in the request.
    ///   - gatingRule: The gating rule requested.
    ///   - tags: The tags associated with the safety rule.
    ///   - logger: Logger use during operation
    @inlinable
    public func createSafetyRule(
        assertionRule: NewAssertionRule? = nil,
        clientToken: String? = CreateSafetyRuleRequest.idempotencyToken(),
        gatingRule: NewGatingRule? = nil,
        tags: [String: String]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateSafetyRuleResponse {
        let input = CreateSafetyRuleRequest(
            assertionRule: assertionRule, 
            clientToken: clientToken, 
            gatingRule: gatingRule, 
            tags: tags
        )
        return try await self.createSafetyRule(input, logger: logger)
    }

    /// Delete a cluster.
    @Sendable
    @inlinable
    public func deleteCluster(_ input: DeleteClusterRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteClusterResponse {
        try await self.client.execute(
            operation: "DeleteCluster", 
            path: "/cluster/{ClusterArn}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Delete a cluster.
    ///
    /// Parameters:
    ///   - clusterArn: The Amazon Resource Name (ARN) of the cluster that you're deleting.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteCluster(
        clusterArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteClusterResponse {
        let input = DeleteClusterRequest(
            clusterArn: clusterArn
        )
        return try await self.deleteCluster(input, logger: logger)
    }

    /// Deletes a control panel.
    @Sendable
    @inlinable
    public func deleteControlPanel(_ input: DeleteControlPanelRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteControlPanelResponse {
        try await self.client.execute(
            operation: "DeleteControlPanel", 
            path: "/controlpanel/{ControlPanelArn}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes a control panel.
    ///
    /// Parameters:
    ///   - controlPanelArn: The Amazon Resource Name (ARN) of the control panel.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteControlPanel(
        controlPanelArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteControlPanelResponse {
        let input = DeleteControlPanelRequest(
            controlPanelArn: controlPanelArn
        )
        return try await self.deleteControlPanel(input, logger: logger)
    }

    /// Deletes a routing control.
    @Sendable
    @inlinable
    public func deleteRoutingControl(_ input: DeleteRoutingControlRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteRoutingControlResponse {
        try await self.client.execute(
            operation: "DeleteRoutingControl", 
            path: "/routingcontrol/{RoutingControlArn}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes a routing control.
    ///
    /// Parameters:
    ///   - routingControlArn: The Amazon Resource Name (ARN) of the routing control that you're deleting.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteRoutingControl(
        routingControlArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteRoutingControlResponse {
        let input = DeleteRoutingControlRequest(
            routingControlArn: routingControlArn
        )
        return try await self.deleteRoutingControl(input, logger: logger)
    }

    /// Deletes a safety rule./&gt;
    @Sendable
    @inlinable
    public func deleteSafetyRule(_ input: DeleteSafetyRuleRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteSafetyRuleResponse {
        try await self.client.execute(
            operation: "DeleteSafetyRule", 
            path: "/safetyrule/{SafetyRuleArn}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes a safety rule./&gt;
    ///
    /// Parameters:
    ///   - safetyRuleArn: The ARN of the safety rule.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteSafetyRule(
        safetyRuleArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteSafetyRuleResponse {
        let input = DeleteSafetyRuleRequest(
            safetyRuleArn: safetyRuleArn
        )
        return try await self.deleteSafetyRule(input, logger: logger)
    }

    /// Display the details about a cluster. The response includes the cluster name, endpoints, status, and Amazon Resource Name (ARN).
    @Sendable
    @inlinable
    public func describeCluster(_ input: DescribeClusterRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeClusterResponse {
        try await self.client.execute(
            operation: "DescribeCluster", 
            path: "/cluster/{ClusterArn}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Display the details about a cluster. The response includes the cluster name, endpoints, status, and Amazon Resource Name (ARN).
    ///
    /// Parameters:
    ///   - clusterArn: The Amazon Resource Name (ARN) of the cluster.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeCluster(
        clusterArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeClusterResponse {
        let input = DescribeClusterRequest(
            clusterArn: clusterArn
        )
        return try await self.describeCluster(input, logger: logger)
    }

    /// Displays details about a control panel.
    @Sendable
    @inlinable
    public func describeControlPanel(_ input: DescribeControlPanelRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeControlPanelResponse {
        try await self.client.execute(
            operation: "DescribeControlPanel", 
            path: "/controlpanel/{ControlPanelArn}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Displays details about a control panel.
    ///
    /// Parameters:
    ///   - controlPanelArn: The Amazon Resource Name (ARN) of the control panel.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeControlPanel(
        controlPanelArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeControlPanelResponse {
        let input = DescribeControlPanelRequest(
            controlPanelArn: controlPanelArn
        )
        return try await self.describeControlPanel(input, logger: logger)
    }

    /// Displays details about a routing control. A routing control has one of two states: ON and OFF. You can map the routing control state to the state of an Amazon Route 53 health check, which can be used to control routing. To get or update the routing control state, see the Recovery Cluster (data plane) API actions for Amazon Route 53 Application Recovery Controller.
    @Sendable
    @inlinable
    public func describeRoutingControl(_ input: DescribeRoutingControlRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeRoutingControlResponse {
        try await self.client.execute(
            operation: "DescribeRoutingControl", 
            path: "/routingcontrol/{RoutingControlArn}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Displays details about a routing control. A routing control has one of two states: ON and OFF. You can map the routing control state to the state of an Amazon Route 53 health check, which can be used to control routing. To get or update the routing control state, see the Recovery Cluster (data plane) API actions for Amazon Route 53 Application Recovery Controller.
    ///
    /// Parameters:
    ///   - routingControlArn: The Amazon Resource Name (ARN) of the routing control.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeRoutingControl(
        routingControlArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeRoutingControlResponse {
        let input = DescribeRoutingControlRequest(
            routingControlArn: routingControlArn
        )
        return try await self.describeRoutingControl(input, logger: logger)
    }

    /// Returns information about a safety rule.
    @Sendable
    @inlinable
    public func describeSafetyRule(_ input: DescribeSafetyRuleRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeSafetyRuleResponse {
        try await self.client.execute(
            operation: "DescribeSafetyRule", 
            path: "/safetyrule/{SafetyRuleArn}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns information about a safety rule.
    ///
    /// Parameters:
    ///   - safetyRuleArn: The ARN of the safety rule.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeSafetyRule(
        safetyRuleArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeSafetyRuleResponse {
        let input = DescribeSafetyRuleRequest(
            safetyRuleArn: safetyRuleArn
        )
        return try await self.describeSafetyRule(input, logger: logger)
    }

    /// Get information about the resource policy for a cluster.
    @Sendable
    @inlinable
    public func getResourcePolicy(_ input: GetResourcePolicyRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetResourcePolicyResponse {
        try await self.client.execute(
            operation: "GetResourcePolicy", 
            path: "/resourcePolicy/{ResourceArn}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Get information about the resource policy for a cluster.
    ///
    /// Parameters:
    ///   - resourceArn: The Amazon Resource Name (ARN) of the resource.
    ///   - logger: Logger use during operation
    @inlinable
    public func getResourcePolicy(
        resourceArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetResourcePolicyResponse {
        let input = GetResourcePolicyRequest(
            resourceArn: resourceArn
        )
        return try await self.getResourcePolicy(input, logger: logger)
    }

    /// Returns an array of all Amazon Route 53 health checks associated with a specific routing control.
    @Sendable
    @inlinable
    public func listAssociatedRoute53HealthChecks(_ input: ListAssociatedRoute53HealthChecksRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListAssociatedRoute53HealthChecksResponse {
        try await self.client.execute(
            operation: "ListAssociatedRoute53HealthChecks", 
            path: "/routingcontrol/{RoutingControlArn}/associatedRoute53HealthChecks", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns an array of all Amazon Route 53 health checks associated with a specific routing control.
    ///
    /// Parameters:
    ///   - maxResults: The number of objects that you want to return with this call.
    ///   - nextToken: The token that identifies which batch of results you want to see.
    ///   - routingControlArn: The Amazon Resource Name (ARN) of the routing control.
    ///   - logger: Logger use during operation
    @inlinable
    public func listAssociatedRoute53HealthChecks(
        maxResults: Int? = nil,
        nextToken: String? = nil,
        routingControlArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListAssociatedRoute53HealthChecksResponse {
        let input = ListAssociatedRoute53HealthChecksRequest(
            maxResults: maxResults, 
            nextToken: nextToken, 
            routingControlArn: routingControlArn
        )
        return try await self.listAssociatedRoute53HealthChecks(input, logger: logger)
    }

    /// Returns an array of all the clusters in an account.
    @Sendable
    @inlinable
    public func listClusters(_ input: ListClustersRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListClustersResponse {
        try await self.client.execute(
            operation: "ListClusters", 
            path: "/cluster", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns an array of all the clusters in an account.
    ///
    /// Parameters:
    ///   - maxResults: The number of objects that you want to return with this call.
    ///   - nextToken: The token that identifies which batch of results you want to see.
    ///   - logger: Logger use during operation
    @inlinable
    public func listClusters(
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListClustersResponse {
        let input = ListClustersRequest(
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listClusters(input, logger: logger)
    }

    /// Returns an array of control panels in an account or in a cluster.
    @Sendable
    @inlinable
    public func listControlPanels(_ input: ListControlPanelsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListControlPanelsResponse {
        try await self.client.execute(
            operation: "ListControlPanels", 
            path: "/controlpanels", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns an array of control panels in an account or in a cluster.
    ///
    /// Parameters:
    ///   - clusterArn: The Amazon Resource Name (ARN) of a cluster.
    ///   - maxResults: The number of objects that you want to return with this call.
    ///   - nextToken: The token that identifies which batch of results you want to see.
    ///   - logger: Logger use during operation
    @inlinable
    public func listControlPanels(
        clusterArn: String? = nil,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListControlPanelsResponse {
        let input = ListControlPanelsRequest(
            clusterArn: clusterArn, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listControlPanels(input, logger: logger)
    }

    /// Returns an array of routing controls for a control panel. A routing control is an Amazon Route 53 Application Recovery Controller construct that has one of two states: ON and OFF. You can map the routing control state to the state of an Amazon Route 53 health check, which can be used to control routing.
    @Sendable
    @inlinable
    public func listRoutingControls(_ input: ListRoutingControlsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListRoutingControlsResponse {
        try await self.client.execute(
            operation: "ListRoutingControls", 
            path: "/controlpanel/{ControlPanelArn}/routingcontrols", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns an array of routing controls for a control panel. A routing control is an Amazon Route 53 Application Recovery Controller construct that has one of two states: ON and OFF. You can map the routing control state to the state of an Amazon Route 53 health check, which can be used to control routing.
    ///
    /// Parameters:
    ///   - controlPanelArn: The Amazon Resource Name (ARN) of the control panel.
    ///   - maxResults: The number of objects that you want to return with this call.
    ///   - nextToken: The token that identifies which batch of results you want to see.
    ///   - logger: Logger use during operation
    @inlinable
    public func listRoutingControls(
        controlPanelArn: String,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListRoutingControlsResponse {
        let input = ListRoutingControlsRequest(
            controlPanelArn: controlPanelArn, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listRoutingControls(input, logger: logger)
    }

    /// List the safety rules (the assertion rules and gating rules) that you've defined for the routing controls in a control panel.
    @Sendable
    @inlinable
    public func listSafetyRules(_ input: ListSafetyRulesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListSafetyRulesResponse {
        try await self.client.execute(
            operation: "ListSafetyRules", 
            path: "/controlpanel/{ControlPanelArn}/safetyrules", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// List the safety rules (the assertion rules and gating rules) that you've defined for the routing controls in a control panel.
    ///
    /// Parameters:
    ///   - controlPanelArn: The Amazon Resource Name (ARN) of the control panel.
    ///   - maxResults: The number of objects that you want to return with this call.
    ///   - nextToken: The token that identifies which batch of results you want to see.
    ///   - logger: Logger use during operation
    @inlinable
    public func listSafetyRules(
        controlPanelArn: String,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListSafetyRulesResponse {
        let input = ListSafetyRulesRequest(
            controlPanelArn: controlPanelArn, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listSafetyRules(input, logger: logger)
    }

    /// Lists the tags for a resource.
    @Sendable
    @inlinable
    public func listTagsForResource(_ input: ListTagsForResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListTagsForResourceResponse {
        try await self.client.execute(
            operation: "ListTagsForResource", 
            path: "/tags/{ResourceArn}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists the tags for a resource.
    ///
    /// Parameters:
    ///   - resourceArn: The Amazon Resource Name (ARN) for the resource that's tagged.
    ///   - logger: Logger use during operation
    @inlinable
    public func listTagsForResource(
        resourceArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListTagsForResourceResponse {
        let input = ListTagsForResourceRequest(
            resourceArn: resourceArn
        )
        return try await self.listTagsForResource(input, logger: logger)
    }

    /// Adds a tag to a resource.
    @Sendable
    @inlinable
    public func tagResource(_ input: TagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> TagResourceResponse {
        try await self.client.execute(
            operation: "TagResource", 
            path: "/tags/{ResourceArn}", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Adds a tag to a resource.
    ///
    /// Parameters:
    ///   - resourceArn: The Amazon Resource Name (ARN) for the resource that's tagged.
    ///   - tags: The tags associated with the resource.
    ///   - logger: Logger use during operation
    @inlinable
    public func tagResource(
        resourceArn: String,
        tags: [String: String]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> TagResourceResponse {
        let input = TagResourceRequest(
            resourceArn: resourceArn, 
            tags: tags
        )
        return try await self.tagResource(input, logger: logger)
    }

    /// Removes a tag from a resource.
    @Sendable
    @inlinable
    public func untagResource(_ input: UntagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UntagResourceResponse {
        try await self.client.execute(
            operation: "UntagResource", 
            path: "/tags/{ResourceArn}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Removes a tag from a resource.
    ///
    /// Parameters:
    ///   - resourceArn: The Amazon Resource Name (ARN) for the resource that's tagged.
    ///   - tagKeys: Keys for the tags to be removed.
    ///   - logger: Logger use during operation
    @inlinable
    public func untagResource(
        resourceArn: String,
        tagKeys: [String]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UntagResourceResponse {
        let input = UntagResourceRequest(
            resourceArn: resourceArn, 
            tagKeys: tagKeys
        )
        return try await self.untagResource(input, logger: logger)
    }

    /// Updates an existing cluster. You can only update the network type of a cluster.
    @Sendable
    @inlinable
    public func updateCluster(_ input: UpdateClusterRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateClusterResponse {
        try await self.client.execute(
            operation: "UpdateCluster", 
            path: "/cluster", 
            httpMethod: .PUT, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates an existing cluster. You can only update the network type of a cluster.
    ///
    /// Parameters:
    ///   - clusterArn: The Amazon Resource Name (ARN) of the cluster.
    ///   - networkType: The network type of the cluster. NetworkType can be one of the following: IPV4, DUALSTACK.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateCluster(
        clusterArn: String? = nil,
        networkType: NetworkType? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateClusterResponse {
        let input = UpdateClusterRequest(
            clusterArn: clusterArn, 
            networkType: networkType
        )
        return try await self.updateCluster(input, logger: logger)
    }

    /// Updates a control panel. The only update you can make to a control panel is to change the name of the control panel.
    @Sendable
    @inlinable
    public func updateControlPanel(_ input: UpdateControlPanelRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateControlPanelResponse {
        try await self.client.execute(
            operation: "UpdateControlPanel", 
            path: "/controlpanel", 
            httpMethod: .PUT, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates a control panel. The only update you can make to a control panel is to change the name of the control panel.
    ///
    /// Parameters:
    ///   - controlPanelArn: The Amazon Resource Name (ARN) of the control panel.
    ///   - controlPanelName: The name of the control panel.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateControlPanel(
        controlPanelArn: String? = nil,
        controlPanelName: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateControlPanelResponse {
        let input = UpdateControlPanelRequest(
            controlPanelArn: controlPanelArn, 
            controlPanelName: controlPanelName
        )
        return try await self.updateControlPanel(input, logger: logger)
    }

    /// Updates a routing control. You can only update the name of the routing control. To get or update the routing control state, see the Recovery Cluster (data plane) API actions for Amazon Route 53 Application Recovery Controller.
    @Sendable
    @inlinable
    public func updateRoutingControl(_ input: UpdateRoutingControlRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateRoutingControlResponse {
        try await self.client.execute(
            operation: "UpdateRoutingControl", 
            path: "/routingcontrol", 
            httpMethod: .PUT, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates a routing control. You can only update the name of the routing control. To get or update the routing control state, see the Recovery Cluster (data plane) API actions for Amazon Route 53 Application Recovery Controller.
    ///
    /// Parameters:
    ///   - routingControlArn: The Amazon Resource Name (ARN) of the routing control.
    ///   - routingControlName: The name of the routing control.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateRoutingControl(
        routingControlArn: String? = nil,
        routingControlName: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateRoutingControlResponse {
        let input = UpdateRoutingControlRequest(
            routingControlArn: routingControlArn, 
            routingControlName: routingControlName
        )
        return try await self.updateRoutingControl(input, logger: logger)
    }

    /// Update a safety rule (an assertion rule or gating rule). You can only update the name and the waiting period for a safety rule. To make other updates, delete the safety rule and create a new one.
    @Sendable
    @inlinable
    public func updateSafetyRule(_ input: UpdateSafetyRuleRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateSafetyRuleResponse {
        try await self.client.execute(
            operation: "UpdateSafetyRule", 
            path: "/safetyrule", 
            httpMethod: .PUT, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Update a safety rule (an assertion rule or gating rule). You can only update the name and the waiting period for a safety rule. To make other updates, delete the safety rule and create a new one.
    ///
    /// Parameters:
    ///   - assertionRuleUpdate: The assertion rule to update.
    ///   - gatingRuleUpdate: The gating rule to update.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateSafetyRule(
        assertionRuleUpdate: AssertionRuleUpdate? = nil,
        gatingRuleUpdate: GatingRuleUpdate? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateSafetyRuleResponse {
        let input = UpdateSafetyRuleRequest(
            assertionRuleUpdate: assertionRuleUpdate, 
            gatingRuleUpdate: gatingRuleUpdate
        )
        return try await self.updateSafetyRule(input, logger: logger)
    }
}

extension Route53RecoveryControlConfig {
    /// Initializer required by `AWSService.with(middlewares:timeout:byteBufferAllocator:options)`. You are not able to use this initializer directly as there are not public
    /// initializers for `AWSServiceConfig.Patch`. Please use `AWSService.with(middlewares:timeout:byteBufferAllocator:options)` instead.
    public init(from: Route53RecoveryControlConfig, patch: AWSServiceConfig.Patch) {
        self.client = from.client
        self.config = from.config.with(patch: patch)
    }
}

// MARK: Paginators

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Route53RecoveryControlConfig {
    /// Return PaginatorSequence for operation ``listAssociatedRoute53HealthChecks(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listAssociatedRoute53HealthChecksPaginator(
        _ input: ListAssociatedRoute53HealthChecksRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListAssociatedRoute53HealthChecksRequest, ListAssociatedRoute53HealthChecksResponse> {
        return .init(
            input: input,
            command: self.listAssociatedRoute53HealthChecks,
            inputKey: \ListAssociatedRoute53HealthChecksRequest.nextToken,
            outputKey: \ListAssociatedRoute53HealthChecksResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listAssociatedRoute53HealthChecks(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults: The number of objects that you want to return with this call.
    ///   - routingControlArn: The Amazon Resource Name (ARN) of the routing control.
    ///   - logger: Logger used for logging
    @inlinable
    public func listAssociatedRoute53HealthChecksPaginator(
        maxResults: Int? = nil,
        routingControlArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListAssociatedRoute53HealthChecksRequest, ListAssociatedRoute53HealthChecksResponse> {
        let input = ListAssociatedRoute53HealthChecksRequest(
            maxResults: maxResults, 
            routingControlArn: routingControlArn
        )
        return self.listAssociatedRoute53HealthChecksPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listClusters(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listClustersPaginator(
        _ input: ListClustersRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListClustersRequest, ListClustersResponse> {
        return .init(
            input: input,
            command: self.listClusters,
            inputKey: \ListClustersRequest.nextToken,
            outputKey: \ListClustersResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listClusters(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults: The number of objects that you want to return with this call.
    ///   - logger: Logger used for logging
    @inlinable
    public func listClustersPaginator(
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListClustersRequest, ListClustersResponse> {
        let input = ListClustersRequest(
            maxResults: maxResults
        )
        return self.listClustersPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listControlPanels(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listControlPanelsPaginator(
        _ input: ListControlPanelsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListControlPanelsRequest, ListControlPanelsResponse> {
        return .init(
            input: input,
            command: self.listControlPanels,
            inputKey: \ListControlPanelsRequest.nextToken,
            outputKey: \ListControlPanelsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listControlPanels(_:logger:)``.
    ///
    /// - Parameters:
    ///   - clusterArn: The Amazon Resource Name (ARN) of a cluster.
    ///   - maxResults: The number of objects that you want to return with this call.
    ///   - logger: Logger used for logging
    @inlinable
    public func listControlPanelsPaginator(
        clusterArn: String? = nil,
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListControlPanelsRequest, ListControlPanelsResponse> {
        let input = ListControlPanelsRequest(
            clusterArn: clusterArn, 
            maxResults: maxResults
        )
        return self.listControlPanelsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listRoutingControls(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listRoutingControlsPaginator(
        _ input: ListRoutingControlsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListRoutingControlsRequest, ListRoutingControlsResponse> {
        return .init(
            input: input,
            command: self.listRoutingControls,
            inputKey: \ListRoutingControlsRequest.nextToken,
            outputKey: \ListRoutingControlsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listRoutingControls(_:logger:)``.
    ///
    /// - Parameters:
    ///   - controlPanelArn: The Amazon Resource Name (ARN) of the control panel.
    ///   - maxResults: The number of objects that you want to return with this call.
    ///   - logger: Logger used for logging
    @inlinable
    public func listRoutingControlsPaginator(
        controlPanelArn: String,
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListRoutingControlsRequest, ListRoutingControlsResponse> {
        let input = ListRoutingControlsRequest(
            controlPanelArn: controlPanelArn, 
            maxResults: maxResults
        )
        return self.listRoutingControlsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listSafetyRules(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listSafetyRulesPaginator(
        _ input: ListSafetyRulesRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListSafetyRulesRequest, ListSafetyRulesResponse> {
        return .init(
            input: input,
            command: self.listSafetyRules,
            inputKey: \ListSafetyRulesRequest.nextToken,
            outputKey: \ListSafetyRulesResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listSafetyRules(_:logger:)``.
    ///
    /// - Parameters:
    ///   - controlPanelArn: The Amazon Resource Name (ARN) of the control panel.
    ///   - maxResults: The number of objects that you want to return with this call.
    ///   - logger: Logger used for logging
    @inlinable
    public func listSafetyRulesPaginator(
        controlPanelArn: String,
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListSafetyRulesRequest, ListSafetyRulesResponse> {
        let input = ListSafetyRulesRequest(
            controlPanelArn: controlPanelArn, 
            maxResults: maxResults
        )
        return self.listSafetyRulesPaginator(input, logger: logger)
    }
}

extension Route53RecoveryControlConfig.ListAssociatedRoute53HealthChecksRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> Route53RecoveryControlConfig.ListAssociatedRoute53HealthChecksRequest {
        return .init(
            maxResults: self.maxResults,
            nextToken: token,
            routingControlArn: self.routingControlArn
        )
    }
}

extension Route53RecoveryControlConfig.ListClustersRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> Route53RecoveryControlConfig.ListClustersRequest {
        return .init(
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension Route53RecoveryControlConfig.ListControlPanelsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> Route53RecoveryControlConfig.ListControlPanelsRequest {
        return .init(
            clusterArn: self.clusterArn,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension Route53RecoveryControlConfig.ListRoutingControlsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> Route53RecoveryControlConfig.ListRoutingControlsRequest {
        return .init(
            controlPanelArn: self.controlPanelArn,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension Route53RecoveryControlConfig.ListSafetyRulesRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> Route53RecoveryControlConfig.ListSafetyRulesRequest {
        return .init(
            controlPanelArn: self.controlPanelArn,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

// MARK: Waiters

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Route53RecoveryControlConfig {
    /// Waiter for operation ``describeCluster(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func waitUntilClusterCreated(
        _ input: DescribeClusterRequest,
        maxWaitTime: TimeAmount? = nil,
        logger: Logger = AWSClient.loggingDisabled
    ) async throws {
        let waiter = AWSClient.Waiter<DescribeClusterRequest, _>(
            acceptors: [
                .init(state: .success, matcher: try! JMESPathMatcher("cluster.status", expected: "DEPLOYED")),
                .init(state: .retry, matcher: try! JMESPathMatcher("cluster.status", expected: "PENDING")),
                .init(state: .retry, matcher: AWSErrorCodeMatcher("InternalServerException")),
            ],
            minDelayTime: .seconds(5),
            command: self.describeCluster
        )
        return try await self.client.waitUntil(input, waiter: waiter, maxWaitTime: maxWaitTime, logger: logger)
    }
    /// Waiter for operation ``describeCluster(_:logger:)``.
    ///
    /// - Parameters:
    ///   - clusterArn: The Amazon Resource Name (ARN) of the cluster.
    ///   - logger: Logger used for logging
    @inlinable
    public func waitUntilClusterCreated(
        clusterArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = DescribeClusterRequest(
            clusterArn: clusterArn
        )
        try await self.waitUntilClusterCreated(input, logger: logger)
    }

    /// Waiter for operation ``describeCluster(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func waitUntilClusterDeleted(
        _ input: DescribeClusterRequest,
        maxWaitTime: TimeAmount? = nil,
        logger: Logger = AWSClient.loggingDisabled
    ) async throws {
        let waiter = AWSClient.Waiter<DescribeClusterRequest, _>(
            acceptors: [
                .init(state: .success, matcher: AWSErrorCodeMatcher("ResourceNotFoundException")),
                .init(state: .retry, matcher: try! JMESPathMatcher("cluster.status", expected: "PENDING_DELETION")),
                .init(state: .retry, matcher: AWSErrorCodeMatcher("InternalServerException")),
            ],
            minDelayTime: .seconds(5),
            command: self.describeCluster
        )
        return try await self.client.waitUntil(input, waiter: waiter, maxWaitTime: maxWaitTime, logger: logger)
    }
    /// Waiter for operation ``describeCluster(_:logger:)``.
    ///
    /// - Parameters:
    ///   - clusterArn: The Amazon Resource Name (ARN) of the cluster.
    ///   - logger: Logger used for logging
    @inlinable
    public func waitUntilClusterDeleted(
        clusterArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = DescribeClusterRequest(
            clusterArn: clusterArn
        )
        try await self.waitUntilClusterDeleted(input, logger: logger)
    }

    /// Waiter for operation ``describeControlPanel(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func waitUntilControlPanelCreated(
        _ input: DescribeControlPanelRequest,
        maxWaitTime: TimeAmount? = nil,
        logger: Logger = AWSClient.loggingDisabled
    ) async throws {
        let waiter = AWSClient.Waiter<DescribeControlPanelRequest, _>(
            acceptors: [
                .init(state: .success, matcher: try! JMESPathMatcher("controlPanel.status", expected: "DEPLOYED")),
                .init(state: .retry, matcher: try! JMESPathMatcher("controlPanel.status", expected: "PENDING")),
                .init(state: .retry, matcher: AWSErrorCodeMatcher("InternalServerException")),
            ],
            minDelayTime: .seconds(5),
            command: self.describeControlPanel
        )
        return try await self.client.waitUntil(input, waiter: waiter, maxWaitTime: maxWaitTime, logger: logger)
    }
    /// Waiter for operation ``describeControlPanel(_:logger:)``.
    ///
    /// - Parameters:
    ///   - controlPanelArn: The Amazon Resource Name (ARN) of the control panel.
    ///   - logger: Logger used for logging
    @inlinable
    public func waitUntilControlPanelCreated(
        controlPanelArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = DescribeControlPanelRequest(
            controlPanelArn: controlPanelArn
        )
        try await self.waitUntilControlPanelCreated(input, logger: logger)
    }

    /// Waiter for operation ``describeControlPanel(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func waitUntilControlPanelDeleted(
        _ input: DescribeControlPanelRequest,
        maxWaitTime: TimeAmount? = nil,
        logger: Logger = AWSClient.loggingDisabled
    ) async throws {
        let waiter = AWSClient.Waiter<DescribeControlPanelRequest, _>(
            acceptors: [
                .init(state: .success, matcher: AWSErrorCodeMatcher("ResourceNotFoundException")),
                .init(state: .retry, matcher: try! JMESPathMatcher("controlPanel.status", expected: "PENDING_DELETION")),
                .init(state: .retry, matcher: AWSErrorCodeMatcher("InternalServerException")),
            ],
            minDelayTime: .seconds(5),
            command: self.describeControlPanel
        )
        return try await self.client.waitUntil(input, waiter: waiter, maxWaitTime: maxWaitTime, logger: logger)
    }
    /// Waiter for operation ``describeControlPanel(_:logger:)``.
    ///
    /// - Parameters:
    ///   - controlPanelArn: The Amazon Resource Name (ARN) of the control panel.
    ///   - logger: Logger used for logging
    @inlinable
    public func waitUntilControlPanelDeleted(
        controlPanelArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = DescribeControlPanelRequest(
            controlPanelArn: controlPanelArn
        )
        try await self.waitUntilControlPanelDeleted(input, logger: logger)
    }

    /// Waiter for operation ``describeRoutingControl(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func waitUntilRoutingControlCreated(
        _ input: DescribeRoutingControlRequest,
        maxWaitTime: TimeAmount? = nil,
        logger: Logger = AWSClient.loggingDisabled
    ) async throws {
        let waiter = AWSClient.Waiter<DescribeRoutingControlRequest, _>(
            acceptors: [
                .init(state: .success, matcher: try! JMESPathMatcher("routingControl.status", expected: "DEPLOYED")),
                .init(state: .retry, matcher: try! JMESPathMatcher("routingControl.status", expected: "PENDING")),
                .init(state: .retry, matcher: AWSErrorCodeMatcher("InternalServerException")),
            ],
            minDelayTime: .seconds(5),
            command: self.describeRoutingControl
        )
        return try await self.client.waitUntil(input, waiter: waiter, maxWaitTime: maxWaitTime, logger: logger)
    }
    /// Waiter for operation ``describeRoutingControl(_:logger:)``.
    ///
    /// - Parameters:
    ///   - routingControlArn: The Amazon Resource Name (ARN) of the routing control.
    ///   - logger: Logger used for logging
    @inlinable
    public func waitUntilRoutingControlCreated(
        routingControlArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = DescribeRoutingControlRequest(
            routingControlArn: routingControlArn
        )
        try await self.waitUntilRoutingControlCreated(input, logger: logger)
    }

    /// Waiter for operation ``describeRoutingControl(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func waitUntilRoutingControlDeleted(
        _ input: DescribeRoutingControlRequest,
        maxWaitTime: TimeAmount? = nil,
        logger: Logger = AWSClient.loggingDisabled
    ) async throws {
        let waiter = AWSClient.Waiter<DescribeRoutingControlRequest, _>(
            acceptors: [
                .init(state: .success, matcher: AWSErrorCodeMatcher("ResourceNotFoundException")),
                .init(state: .retry, matcher: try! JMESPathMatcher("routingControl.status", expected: "PENDING_DELETION")),
                .init(state: .retry, matcher: AWSErrorCodeMatcher("InternalServerException")),
            ],
            minDelayTime: .seconds(5),
            command: self.describeRoutingControl
        )
        return try await self.client.waitUntil(input, waiter: waiter, maxWaitTime: maxWaitTime, logger: logger)
    }
    /// Waiter for operation ``describeRoutingControl(_:logger:)``.
    ///
    /// - Parameters:
    ///   - routingControlArn: The Amazon Resource Name (ARN) of the routing control.
    ///   - logger: Logger used for logging
    @inlinable
    public func waitUntilRoutingControlDeleted(
        routingControlArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = DescribeRoutingControlRequest(
            routingControlArn: routingControlArn
        )
        try await self.waitUntilRoutingControlDeleted(input, logger: logger)
    }
}
